package me.firstapp.service.weixin.product;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import me.firstapp.common.utils.Page;
import me.firstapp.module.weixin.member.Member;
import me.firstapp.module.weixin.order.ProductOrder;

public interface ProductOrderService {

	ProductOrder executeCreateOrder(String openId, Long productId, int counts, String receiveName, String receiveMobile,
			String receiveAddress, String remark, String skuName);

	ProductOrder findByOrderNo(String openId, String orderNo);

	ProductOrder findByOrderNo(String orderNo);

	ProductOrder executeCancelOrder(ProductOrder productOrder);

	ProductOrder executeSettle(ProductOrder productOrder);

	ProductOrder executeUpdate(ProductOrder productOrder);

	List<ProductOrder> findOrders(Integer status);

	List<ProductOrder> findOrders(Integer status, Integer settleFlag);

	List<ProductOrder> findOrdersPage(int pageIndex, int pageSize, String openId, Integer status);

	void executeConfirmOrder(ProductOrder productOrder);

	void executeSavePaymentRecord(ProductOrder productOrder, String thirdPayNo, Integer status, String errorCode,
			String errorDesc);

	Page<ProductOrder> findProductOrderPage(Integer pageNo, Integer pageSize, Map<String, Object> searchParams,
			String sortParam, String sortType, Date startTime, Date endTime);

	ProductOrder executeBeiBiPay(ProductOrder productOrder, Member member);

	ProductOrder executeReturn(ProductOrder productOrder);

	void executeGivePoint(ProductOrder productOrder);

	BigDecimal findTotalPayAmountinTimes(String openId, Date start, Date end);
}
